/*
 * Copyright (c) 2014-2020 杭州派迩信息技术有限公司 All Rights Reserved.
 * ProjectName: pi-flowable-project
 * ModuleName: pi-actuator-service
 * FileName: PiActuatorServiceInstanceService.java
 * Author: kai.li
 * Date: 2021/08/31 18:16:31
 * Version: 1.0
 * LastModified: 2021/08/31 18:16:31
 */

package com.pisolution.actuator.service.service;

import com.alibaba.fastjson.JSONObject;
import com.pisolution.actuator.service.model.PageActionResult;
import com.pisolution.actuator.service.model.PiActuatorServiceInstance;
import com.pisolution.actuator.service.model.ServiceInstanceReq;

import java.util.Map;

/**
 * @className: PiActuatorServiceInstanceService
 * @description: 服务接口
 * @author: kai.li
 * @date: 2021/08/31 18:16:31
 * @since: 1.0
 */

public interface PiActuatorServiceInstanceService {

    /**
     * @title 服务注册
     * @description
     * @author admin
     * @updateTime 2021/9/2 10:01
     * @throws
     */
    String register(Map<String, Object> registerInfo);

    /**
     * @title 心跳监控
     * @description
     * @author admin
     * @updateTime 2021/9/2 10:07
     * @throws
     */
    String heartbeat(Map<String, Object> heartbeatInfo);

    /**
     * @title 注销服务
     * @description
     * @author admin
     * @updateTime 2021/9/2 15:58
     * @throws
     */
    String deregister(String id);

    /**
     * @title 分页检索服务实例列表
     * @description
     * @author admin
     * @updateTime 2021/9/15 10:34
     * @throws
     */
    PageActionResult<PiActuatorServiceInstance> pageList(ServiceInstanceReq serviceInstanceReq);

    /**
     * @title
     * @description
     * @author admin
     * @updateTime 2021/9/15 15:16
     * @throws
     */
    JSONObject gethealth(Long instanceId);

    /**
     * @title 获取info信息
     * @description
     * @author admin
     * @updateTime 2021/9/16 14:53
     * @throws
     */
    JSONObject getInfo(Long instanceId);

    /**
     * @title 获取env信息
     * @description
     * @author admin
     * @updateTime 2021/9/16 14:53
     * @throws
     */
    JSONObject getEnv(Long instanceId);

    /**
     * @title 获取metrics信息
     * @description
     * @author admin
     * @updateTime 2021/9/16 14:59
     * @throws
     */
    JSONObject getMetrics(Long instanceId, String detail);
}
